package android.magical;

import java.util.Calendar;

import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.app.Dialog;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;

public class DatePickerDialogFragment extends DialogFragment {

	private Fragment mFragment;

    public DatePickerDialogFragment(Fragment callback) {
        mFragment = callback;
    }

     public Dialog onCreateDialog(Bundle savedInstanceState) {
         return new DatePickerDialog(getActivity(), (OnDateSetListener) mFragment, 
        		 AddEventFragment.currentDate.get(Calendar.YEAR), 
        		 AddEventFragment.currentDate.get(Calendar.MONTH),
        		 AddEventFragment.currentDate.get(Calendar.DATE));
     }
}
